Update the documentation to specify a more useful behaviour, which can be
authorMatthias Clasen <mclasen@redhat.com>
Tue, 30 Nov 2004 21:45:26 +0000 (21:45 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Tue, 30 Nov 2004 21:45:26 +0000 (21:45 +0000)
2004-11-30  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtktreesortable.c (gtk_tree_sortable_get_sort_column_id): Update
the documentation to specify a more useful behaviour, which can be
implemented with the multiple special values we have now.  (#159984,
Nicholas Rahn)

* gtk/gtktreemodelsort.c (gtk_tree_model_sort_get_sort_column_id):
* gtk/gtktreestore.c (gtk_tree_store_get_sort_column_id):
* gtk/gtkliststore.c (gtk_list_store_get_sort_column_id): Update the
implementations.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkliststore.c
gtk/gtktreemodelsort.c
gtk/gtktreesortable.c
gtk/gtktreestore.c

index fba1c60449b973a79f9c8c52b33c5254e6ef9f14..b237166984cdf5a3d5f74bdd67ca4eacc2e7132b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,20 @@
+2004-11-30  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtktreesortable.c (gtk_tree_sortable_get_sort_column_id): Update 
+       the documentation to specify a more useful behaviour, which can be
+       implemented with the multiple special values we have now.  (#159984,
+       Nicholas Rahn)
+
+       * gtk/gtktreemodelsort.c (gtk_tree_model_sort_get_sort_column_id): 
+       * gtk/gtktreestore.c (gtk_tree_store_get_sort_column_id): 
+       * gtk/gtkliststore.c (gtk_list_store_get_sort_column_id): Update the
+       implementations.
+
 Tue Nov 30 16:25:29 2004  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtktextdisplay.c (render_para): Don't paint in the
        trailing end of a wrapped line when the selection 
-       starts after the line. (#159984, Matthias Clasen)
+       starts after the line. (#160000, Matthias Clasen)
 
        * gtk/gtktextdisplay.c (gtk_text_layout_draw): pass in byte_count + 1 
        for selection_end index when the selection end is past the end of the 
@@ -77,6 +89,11 @@ Tue Nov 23 19:37:34 2004  Owen Taylor  <otaylor@redhat.com>
 
 2004-11-30  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtktreemodelsort.c (gtk_tree_model_sort_get_sort_column_id): 
+       * gtk/gtktreestore.c (gtk_tree_store_get_sort_column_id): 
+       * gtk/gtktreesortable.c (gtk_tree_sortable_get_sort_column_id): 
+       * gtk/gtkliststore.c (gtk_list_store_get_sort_column_id): 
+
        * NEWS: Updates.
 
 2004-11-29  Matthias Clasen  <mclasen@redhat.com>
index fba1c60449b973a79f9c8c52b33c5254e6ef9f14..b237166984cdf5a3d5f74bdd67ca4eacc2e7132b 100644 (file)
@@ -1,8 +1,20 @@
+2004-11-30  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtktreesortable.c (gtk_tree_sortable_get_sort_column_id): Update 
+       the documentation to specify a more useful behaviour, which can be
+       implemented with the multiple special values we have now.  (#159984,
+       Nicholas Rahn)
+
+       * gtk/gtktreemodelsort.c (gtk_tree_model_sort_get_sort_column_id): 
+       * gtk/gtktreestore.c (gtk_tree_store_get_sort_column_id): 
+       * gtk/gtkliststore.c (gtk_list_store_get_sort_column_id): Update the
+       implementations.
+
 Tue Nov 30 16:25:29 2004  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtktextdisplay.c (render_para): Don't paint in the
        trailing end of a wrapped line when the selection 
-       starts after the line. (#159984, Matthias Clasen)
+       starts after the line. (#160000, Matthias Clasen)
 
        * gtk/gtktextdisplay.c (gtk_text_layout_draw): pass in byte_count + 1 
        for selection_end index when the selection end is past the end of the 
@@ -77,6 +89,11 @@ Tue Nov 23 19:37:34 2004  Owen Taylor  <otaylor@redhat.com>
 
 2004-11-30  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtktreemodelsort.c (gtk_tree_model_sort_get_sort_column_id): 
+       * gtk/gtktreestore.c (gtk_tree_store_get_sort_column_id): 
+       * gtk/gtktreesortable.c (gtk_tree_sortable_get_sort_column_id): 
+       * gtk/gtkliststore.c (gtk_list_store_get_sort_column_id): 
+
        * NEWS: Updates.
 
 2004-11-29  Matthias Clasen  <mclasen@redhat.com>
index fba1c60449b973a79f9c8c52b33c5254e6ef9f14..b237166984cdf5a3d5f74bdd67ca4eacc2e7132b 100644 (file)
@@ -1,8 +1,20 @@
+2004-11-30  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtktreesortable.c (gtk_tree_sortable_get_sort_column_id): Update 
+       the documentation to specify a more useful behaviour, which can be
+       implemented with the multiple special values we have now.  (#159984,
+       Nicholas Rahn)
+
+       * gtk/gtktreemodelsort.c (gtk_tree_model_sort_get_sort_column_id): 
+       * gtk/gtktreestore.c (gtk_tree_store_get_sort_column_id): 
+       * gtk/gtkliststore.c (gtk_list_store_get_sort_column_id): Update the
+       implementations.
+
 Tue Nov 30 16:25:29 2004  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtktextdisplay.c (render_para): Don't paint in the
        trailing end of a wrapped line when the selection 
-       starts after the line. (#159984, Matthias Clasen)
+       starts after the line. (#160000, Matthias Clasen)
 
        * gtk/gtktextdisplay.c (gtk_text_layout_draw): pass in byte_count + 1 
        for selection_end index when the selection end is past the end of the 
@@ -77,6 +89,11 @@ Tue Nov 23 19:37:34 2004  Owen Taylor  <otaylor@redhat.com>
 
 2004-11-30  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtktreemodelsort.c (gtk_tree_model_sort_get_sort_column_id): 
+       * gtk/gtktreestore.c (gtk_tree_store_get_sort_column_id): 
+       * gtk/gtktreesortable.c (gtk_tree_sortable_get_sort_column_id): 
+       * gtk/gtkliststore.c (gtk_list_store_get_sort_column_id): 
+
        * NEWS: Updates.
 
 2004-11-29  Matthias Clasen  <mclasen@redhat.com>
index fba1c60449b973a79f9c8c52b33c5254e6ef9f14..b237166984cdf5a3d5f74bdd67ca4eacc2e7132b 100644 (file)
@@ -1,8 +1,20 @@
+2004-11-30  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtktreesortable.c (gtk_tree_sortable_get_sort_column_id): Update 
+       the documentation to specify a more useful behaviour, which can be
+       implemented with the multiple special values we have now.  (#159984,
+       Nicholas Rahn)
+
+       * gtk/gtktreemodelsort.c (gtk_tree_model_sort_get_sort_column_id): 
+       * gtk/gtktreestore.c (gtk_tree_store_get_sort_column_id): 
+       * gtk/gtkliststore.c (gtk_list_store_get_sort_column_id): Update the
+       implementations.
+
 Tue Nov 30 16:25:29 2004  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtktextdisplay.c (render_para): Don't paint in the
        trailing end of a wrapped line when the selection 
-       starts after the line. (#159984, Matthias Clasen)
+       starts after the line. (#160000, Matthias Clasen)
 
        * gtk/gtktextdisplay.c (gtk_text_layout_draw): pass in byte_count + 1 
        for selection_end index when the selection end is past the end of the 
@@ -77,6 +89,11 @@ Tue Nov 23 19:37:34 2004  Owen Taylor  <otaylor@redhat.com>
 
 2004-11-30  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtktreemodelsort.c (gtk_tree_model_sort_get_sort_column_id): 
+       * gtk/gtktreestore.c (gtk_tree_store_get_sort_column_id): 
+       * gtk/gtktreesortable.c (gtk_tree_sortable_get_sort_column_id): 
+       * gtk/gtkliststore.c (gtk_list_store_get_sort_column_id): 
+
        * NEWS: Updates.
 
 2004-11-29  Matthias Clasen  <mclasen@redhat.com>
index e8de5f8a0a0f8787f619881d445f2bf29f21904a..32489cfa7ff43bcea34b116ac4d9dce0d9bf67bd 100644 (file)
@@ -1699,13 +1699,15 @@ gtk_list_store_get_sort_column_id (GtkTreeSortable  *sortable,
 
   g_return_val_if_fail (GTK_IS_LIST_STORE (sortable), FALSE);
 
-  if (list_store->sort_column_id == GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID)
-    return FALSE;
-
   if (sort_column_id)
     * sort_column_id = list_store->sort_column_id;
   if (order)
     * order = list_store->order;
+
+  if (list_store->sort_column_id == GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID ||
+      list_store->sort_column_id == GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID)
+    return FALSE;
+
   return TRUE;
 }
 
index abfd0c6e4fba8d252838ce03e62948aa20af170d..61cb405f498cb82530480efd444c73e3b73bc747 100644 (file)
@@ -1322,14 +1322,15 @@ gtk_tree_model_sort_get_sort_column_id (GtkTreeSortable *sortable,
 
   g_return_val_if_fail (GTK_IS_TREE_MODEL_SORT (sortable), FALSE);
 
-  if (tree_model_sort->sort_column_id == GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID)
-    return FALSE;
-
   if (sort_column_id)
     *sort_column_id = tree_model_sort->sort_column_id;
   if (order)
     *order = tree_model_sort->order;
 
+  if (tree_model_sort->sort_column_id == GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID ||
+      tree_model_sort->sort_column_id == GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID)
+    return FALSE;
+  
   return TRUE;
 }
 
index 79a7d09287192fcc22656ad38d4e9ab4b3ab4a88..8b0f5d6ac6aebe7a3834be6bb79570446b96ddfc 100644 (file)
@@ -94,10 +94,12 @@ gtk_tree_sortable_sort_column_changed (GtkTreeSortable *sortable)
  * @order: The #GtkSortType to be filled in
  * 
  * Fills in @sort_column_id and @order with the current sort column and the
- * order, if applicable.  If the sort column is not set, then FALSE is returned,
- * and the values in @sort_column_id and @order are unchanged.
-  * 
- * Return value: %TRUE, if the sort column has been set
+ * order.  It returns %TRUE unless the @sort_column_id is 
+ * %GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID or 
+ * %GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID.
+ * 
+ * Return value: %TRUE if the sort column is not one of the special sort
+ *   column ids.
  **/
 gboolean
 gtk_tree_sortable_get_sort_column_id (GtkTreeSortable  *sortable,
index c8cc9cd1fb4107bac24c0b577ff051e52221f459..642b74c728f3e4822ab2ca05faf30ef9dc0147f9 100644 (file)
@@ -2833,15 +2833,16 @@ gtk_tree_store_get_sort_column_id (GtkTreeSortable  *sortable,
 
   g_return_val_if_fail (GTK_IS_TREE_STORE (sortable), FALSE);
 
-  if (tree_store->sort_column_id == GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID)
-    return FALSE;
-
   if (sort_column_id)
     * sort_column_id = tree_store->sort_column_id;
   if (order)
     * order = tree_store->order;
-  return TRUE;
 
+  if (tree_store->sort_column_id == GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID ||
+      tree_store->sort_column_id == GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID)
+    return FALSE;
+
+  return TRUE;
 }
 
 static void